package com.eorchis.module.classcourse.domain;


import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

import com.eorchis.core.basedao.entity.IBaseEntity;
import com.eorchis.module.basedata.domain.BaseData;
import com.eorchis.module.trainingclass.domain.TrainingClass;

/**
 * Title: ClassCourse<br>
 * Description: 班级课程维护实体对象<br>
 * Company: GoldGov<br>
 * Copyright @ 2012 GoldGov .All rights reserved.<br>
 * @author Max
 * @createDate 2014-12-11
 * @version $Revision$
 */
@Entity
@Table(name = "TRAINING_CLASS_COURSE")
public class ClassCourse implements IBaseEntity {
	private static final long serialVersionUID = 1L;

	private String classCourseId;//ID  wtbwbb(委托部委办班)
	private String courseName;//名称  wtbwbb(委托部委办班)
	private String courseNum;//编号    wtbwbb(委托部委办班)
	private Double studyScore;//学时
	private String speaker;//多个讲师用逗号分隔   wtbwbb(委托部委办班)
	private String dutyRemark;//备注
	private String speakdept;//讲师部门     wtbwbb(委托部委办班)
	private BaseData speakway;//课程类型   wtbwbb(委托部委办班)
	private String content;//内容
	//private String classId;//培训班ID
	private TrainingClass trainingClass;//培训班ID  wtbwbb(委托部委办班)
	private Date createDate;
	
	private Date speakDate;//日期  wtbwbb(委托部委办班)
	private BaseData speakTime;//授课时间    上午、下午   wtbwbb(委托部委办班)
	private String speakDuty;//讲师职务     wtbwbb(委托部委办班)
	/**
	 * 获取ID
	 */	
	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(name="CLASS_COURSE_ID")
	public String getClassCourseId() {
		return classCourseId;
	}
	/**
	 * 设置ID
	 */		
	public void setClassCourseId(String classCourseId) {
		this.classCourseId = classCourseId;
	}
	/**
	 * 获取名称
	 */	
	@Column(name="COURSE_NAME")
	public String getCourseName() {
		return courseName;
	}
	/**
	 * 设置名称
	 */		
	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}
	/**
	 * 获取库存的数量
	 */	
	@Column(name="COURSE_NUM")
	public String getCourseNum() {
		return courseNum;
	}
	/**
	 * 设置库存的数量
	 */		
	public void setCourseNum(String courseNum) {
		this.courseNum = courseNum;
	}
	/**
	 * 获取学时
	 */	
	@Column(name="STUDY_SCORE")
	public Double getStudyScore() {
		return studyScore;
	}
	/**
	 * 设置学时
	 */		
	public void setStudyScore(Double studyScore) {
		this.studyScore = studyScore;
	}
	/**
	 * 获取多个讲师用逗号分隔
	 */	
	@Column(name="SPEAKER")
	public String getSpeaker() {
		return speaker;
	}
	/**
	 * 设置多个讲师用逗号分隔
	 */		
	public void setSpeaker(String speaker) {
		this.speaker = speaker;
	}
	/**
	 * 获取备注
	 */	
	@Column(name="DUTY_REMARK")
	public String getDutyRemark() {
		return dutyRemark;
	}
	/**
	 * 设置备注
	 */		
	public void setDutyRemark(String dutyRemark) {
		this.dutyRemark = dutyRemark;
	}
	/**
	 * 获取讲师部门
	 */	
	@Column(name="SPEAKDEPT")
	public String getSpeakdept() {
		return speakdept;
	}
	/**
	 * 设置讲师部门
	 */		
	public void setSpeakdept(String speakdept) {
		this.speakdept = speakdept;
	}
	/**
	 * 获取授课方式
	 */	
	@ManyToOne( fetch = FetchType.LAZY, optional = true)
	@JoinColumn(name = "SPEAKWAY", referencedColumnName = "DATA_CODE")
	public BaseData getSpeakway() {
		return speakway;
	}
	/**
	 * 设置授课方式
	 */		
	public void setSpeakway(BaseData speakway) {
		this.speakway = speakway;
	}
	/**
	 * 获取内容
	 */	
	@Column(name="CONTENT")
	public String getContent() {
		return content;
	}
	/**
	 * 设置内容
	 */		
	public void setContent(String content) {
		this.content = content;
	}
	
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name="CLASS_ID",referencedColumnName = "CLASS_ID" )
	public TrainingClass getTrainingClass() {
		return trainingClass;
	}
	public void setTrainingClass(TrainingClass trainingClass) {
		this.trainingClass = trainingClass;
	}
	
	@Column(name="CREATE_DATE")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	
	
	
	@Column(name="SPEAK_DUTY")
	public String getSpeakDuty() {
		return speakDuty;
	}
	public void setSpeakDuty(String speakDuty) {
		this.speakDuty = speakDuty;
	}
	
	@Column(name="SPEAK_DATE")
	public Date getSpeakDate() {
		return speakDate;
	}
	public void setSpeakDate(Date speakDate) {
		this.speakDate = speakDate;
	}
	
	@ManyToOne( fetch = FetchType.LAZY, optional = true)
	@JoinColumn(name = "SPEAK_TIME", referencedColumnName = "DATA_CODE")
	public BaseData getSpeakTime() {
		return speakTime;
	}
	public void setSpeakTime(BaseData speakTime) {
		this.speakTime = speakTime;
	}
	/**
	 * 记录日志使用
	 */
	public String toString() {
		return "ID======>" + getClassCourseId()+"\n名称======>" + getCourseName()+"\n库存的数量======>" + getCourseNum()+"\n学时======>" + getStudyScore()+"\n多个讲师用逗号分隔======>" + getSpeaker()+"\n备注======>" + getDutyRemark()+"\n讲师部门======>" + getSpeakdept()+"\n授课方式======>" + getSpeakway()+"\n内容======>" + getContent()+"\n培训班ID======>";
	}
}
